home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / cli / BPTools.lha / BPTools / BPTools.doc next >
Text File  |  1994-07-26  |  14KB  |  319 lines

  1.  
  2.                           BridgePort Tools
  3.  
  4.                              Version 1.01
  5.  
  6.                   Copyright (c) 1994 M. C. Henderson
  7.  
  8.  
  9.          These programs have been tested extensively. However,
  10.         use them is at your own risk. I will not be responsible
  11.         for any damage or loss of data caused directly or indirectly
  12.         by these programs. Caution is particularly advised since
  13.         this is the original release of these programs. In other
  14.         words, make sure you have backups of your valuable data!
  15.  
  16.  
  17. 1.0 Introduction
  18.  
  19.   The BridgePort comes with a set of utility programs which allow you to
  20.   create and use virtual IBM disk drives on the Amiga. These jdisk drives
  21.   can be written to, and read from using the IBM programs AWRITE.EXE and
  22.   AREAD.EXE. Although these programs can be fine for transferring small
  23.   amounts of data, they can be slow when large files are being moved. I wrote
  24.   these Amiga programs included herein so I could quickly transfer large
  25.   amounts of data to the jdisks located on the Amiga. 
  26.     
  27.     Using an Amiga 3000 with a 286 BridgePort, the WriteJD program will
  28.   write a 250KB file from the harddrive to a ram based jdisk file in
  29.   approximately 9 seconds versus 62 seconds using the AREAD program. The
  30.   ReadJD program will transfer this same file from the jdisk to Amiga ram in
  31.   approximately 6 seconds versus 62 seconds using AWRITE.  
  32.  
  33.  
  34. 2.0 Programs
  35.   
  36.   BPTools consists of four programs:
  37.  
  38.   1. "JDir" is an Amiga program which allows you to get a directory listing 
  39.       of  a jdisk file while in the Amiga mode.
  40.  
  41.   2. "MakeJD" is an Amiga program which allows you to create a jdisk drive  
  42.       while in the the Amiga mode.
  43.  
  44.   3. "ReadJD" is an Amiga program which allows you to read files from a jdisk
  45.       file while in the Amiga mode.
  46.  
  47.   4. "WriteJD" is an Amiga program which allows you to write to a jdisk file 
  48.       while in the Amiga mode.
  49.  
  50.  
  51.  
  52. 3.0 Instructions
  53.  
  54.       In the instructions given below I have assumed that the reader has
  55.     a good working knowledge of creating and working with jdisk files.
  56.     If not, I suggest you throughly read the your BridgePort user's
  57.     guide. Particularly the information on using JLINK.EXE, AREAD.EXE
  58.     and AWRITE.EXE.
  59.       Note that these programs only work with jlinked jdisk files (virtual
  60.     IBM disks). They will not read or write to psuedo IBM harddrives.  
  61.       
  62.   3.1  JDir
  63.  
  64.       As stated above, JDir is an Amiga program for getting a directory  
  65.     listing of a jdisk file from the Amiga side. This jdisk file could have  
  66.     been created on the IBM side with the JLINK.EXE program or the MakeJD   
  67.     program discused below. Use the following syntax to get a directory  
  68.     listing:
  69.   
  70.                   JDir vd
  71.  
  72.       Where vd is the full path name of the jdisk file on the Amiga (eg 
  73.     DH1:IBMdata/vd). Note that there is no colon after the file name. If it 
  74.     is included, the Amiga will think you are asking for a volume name and 
  75.     put up a requester asking for it.
  76.  
  77.       The syntax for subdirectors is:
  78.       
  79.                   JDir vd\dir1\dir2\dir3
  80.                   
  81.       Note that the IBM backslash convention was used to separate directory
  82.     entries. This was done so the Amiga would not treat these entries as a
  83.     request for information on an Amiga file.
  84.     
  85.       The IBM wildcard symbol "*" (asterick) can be used to get information
  86.     on specific files:
  87.     
  88.                   JDir ram:vd\dir1\*.exe
  89.                   
  90.       This command will list all the files in subdirectory "dir1" that end in
  91.     "exe".
  92.                   
  93.     Limitations:
  94.     
  95.      JDir doesn't have any fancy options such as /p or /w to
  96.     get paged listings. Maybe this is something which could be added if
  97.     there is a request for it.                
  98.                         
  99.  
  100.   3.2 MakeJD
  101.   
  102.      MakeJD is an Amiga program to create a jdisk file on the Amiga. The
  103.    program is similar to the BridgePort IBM program called JLINK.EXE. It
  104.    will create a file on the Amiga which acts as a virtual disk drive on
  105.    the IBM. MakeJD will allow you to create a jdisk file and the programs
  106.    WriteJD and ReadJD discussed below will allow you to write and read
  107.    files to it. MakeJD will NOT however, jlink the file to the IBM. You
  108.    must still do this using JLINK.EXE. 
  109.    
  110.      The syntax for using MakeJD is:
  111.      
  112.                   MakeJD jdisk kilobytes
  113.                   
  114.       Where "jdisk" is the full path and file name of the file you wish to
  115.     create (eg. Ram:dir/vd). "kilobytes" is the number of kilobytes you
  116.     want to assign to this virtual drive (eg. 300 = 300,000 bytes). Note that
  117.     like JLINK.EXE, MakeJD does not create a file that is "kilobytes" large,
  118.     it only creates a file which is allowed to become this size. The file
  119.     becomes larger as you add files to it. Like JLINK.EXE, MakeJD will
  120.     create jdisk files from 160KB to 30MB.
  121.     
  122.       As a sample session, assume you want to create a 300KB jdisk file
  123.     named "vd" in ram and make this file drive d: on the IBM. You would enter:
  124.     
  125.                  MakeJD ram:vd 300
  126.                  
  127.       Then you would go to the IBM and enter:
  128.       
  129.                  jlink d: ram:vd
  130.     
  131.       When you were through with it, you could unlink it by entering:
  132.       
  133.                  jlink d: /u
  134.                  
  135.       Of course it would have been just as easy to create the jdisk on the
  136.     IBM without using MakeJD if this all you wanted to do. The primary
  137.     reason for writing MakeJD was so I could create the jdisk on the Amiga,
  138.     transfer files to it on the Amiga side, then go to the IBM side and
  139.     link it. In my case, I have a VGA card and I have to change the
  140.     monitor output before going to the BridgePort, hence it is
  141.     nicer (and faster) to be able transfer the data before I switch over.
  142.     
  143.                        
  144.     Limitations:
  145.     
  146.       MakeJD has none of the options of JLINK.EXE. It doesn't have a /N
  147.     option because there are not really any messages to surpress. It doesn't
  148.     have a /U option because as explained above, JLINK.EXE must be used
  149.     to link and unlink the jdisk to the IBM. I have never used the /R
  150.     option (create a read only file) with JLINK.EXE, so I didn't include
  151.     it in MakeJD. Again, if this is an option you would like included,
  152.     let me know and I'll look into it.  
  153.     
  154.       Although not a limitation, the file sizes created by MakeJD may not
  155.     always correspond to the file sizes that would be created by JLINK.EXE.
  156.     I spent considerable time trying to figure out the criteria used in
  157.     the JLINK program for assigning file sizes, but never made much sense
  158.     of it. I finally gave up and used my own criteria. As an example,if you
  159.     ask  for a 165KB file with JLINK, you get a 163KB file. With MakeJD you
  160.     will  always get a file at least as large as you have requested.      
  161.         
  162.                      
  163.    3.3 ReadJD
  164.     
  165.      ReadJD is an Amiga program which is anologous to the program called
  166.    AWRITE.EXE on the IBM side. AWRITE will write a jdisk file to the Amiga.
  167.    ReadJD will accomplish the same task by reading the jdisk on the Amiga
  168.    side, but much faster.   
  169.         
  170.      ReadJD will read files from any jdisk file using the following syntax:
  171.      
  172.                    ReadJD vd\dir1\dir2\jname ram:outname 
  173.                    
  174.      This would read a file named "jname" from subdirectory "dir1\dir2" of
  175.    jdisk "vd" and write a file "outname" in ram:. If the output name were
  176.    omitted, the file name "jname" would be written to the current directory.
  177.    Note that back slashes must be used to separate directory entries and
  178.    that no colon is used between the jdisk name and the directory entries.
  179.    If there were no directories, the syntax would be:
  180.    
  181.                    ReadJD vd\jname
  182.                    
  183.      This would read the file name "jname" and write it to the current
  184.    directory. Again, there is no colon between the jdisk and file name.
  185.    The Amiga interperts the colon as being part of a volume name, and
  186.    will put up a requester asking for it.
  187.    
  188.      The IBM style wildcard symbol "*" (asterick) can be used to read
  189.    multiple files, as for example:
  190.    
  191.                    ReadJD vd\*.c
  192.                    
  193.       This would read all files with a "c" extension into the current
  194.     Amiga directory. 
  195.                            
  196.       There is only one option with ReadJD, /t. I'am sure not everone will
  197.     be happy with it. I have flipped the /b option that is used with
  198.     the IBM program AWRITE.EXE. The /b option is used in AWRITE to specify
  199.     binary files. Since most of the files I transfer are binary and I was
  200.     always forgetting to add the /b. I wrote ReadJD to handle binary as
  201.     the default mode. To transfer text files, you must add a /t. This
  202.     option will strip the carriage returns from the IBM text files.     
  203.     For example:
  204.     
  205.                    ReadJD vd\ibm.txt dh1:amiga.txt /t
  206.                    
  207.       This would read the IBM text file "ibm.txt", strip the carriage
  208.     returns, and write a file named "amiga.txt" to drive dh1:. The
  209.     option /t must be the last entry of the command.
  210.     
  211.                          
  212.     Limitations:
  213.     
  214.       As mentioned above, I substituted /t for reading text files for the
  215.     /b option used in AWRITE.EXE for writing binary files. At present
  216.     there is no /cr or /nc options. Let me know if these are desired.  
  217.  
  218.     3.4 WriteJD
  219.     
  220.       WriteJD is anologous to the BridgePort program AREAD.EXE. The IBM
  221.     program AREAD is used to read Amiga files to a jdisk. WriteJD is an
  222.     Amiga program used to write Amiga files to a jdisk (but much faster).
  223.     The syntax is as follows:
  224.     
  225.                   WriteJD dh0:amiga.dat vd\dir1\dir2
  226.                   
  227.       This command would write the file named "amiga.dat" found on drive
  228.     dh0: to jdisk "vd" into subdirectory "dir1\dir2". Note that as with
  229.     ReadJD, back slashes are used to separate subdirectory entries on the
  230.     jdisk and no colon is used between the jdisk name subdirectories. If
  231.     there were no subdirectories on the jdisk, the commamd would have
  232.     simply been:
  233.     
  234.                  WriteJD dh0:amiga.dat vd\
  235.                  
  236.       You can also write to a specific file name on the jdisk:
  237.       
  238.                  WriteJD ram:amiga.dat vd\ibm.dat
  239.                  
  240.       This would transfer the file named "amiga.dat" in ram to jdisk "vd"
  241.     and name it "ibm.dat".
  242.     
  243.       You can also use wildcards to transfer files:
  244.       
  245.                  WriteJD work:cprogs/*.c vd\cprogs
  246.                  
  247.       This command would transfer all files with a "c" extension found in
  248.     the Amiga volume "work",subdirectory "cprogs" to jdisk "vd" subdirectory
  249.     "cprogs".
  250.     
  251.      It should be noted that WriteJD will not create directories
  252.     on the jdisk if they don't exist. This example assumes that the 
  253.     subdirectory "cprogs" had been created on the jdisk "vd" using the
  254.     MSDOS command mkdir.
  255.     
  256.       As with the ReadJD program, the default mode on WriteJD is binary.
  257.     All of the files in the examples above would have been written to the
  258.     jdisk as is. To write text files to a jdisk, a /t option would be
  259.     required:
  260.     
  261.                  WriteJD ram:amiga.txt vd\ibm.txt /t
  262.                  
  263.       The /t option would cause a carriage return to be inserted before
  264.     every line feed. The above command would read the file "amiga.txt" from
  265.     ram, insert carriage returns, and write it to the file "ibm.txt" on
  266.     the jdisk "vd". As with ReadJD, the /t option must be the last entry
  267.     in the command line.
  268.     
  269.    Limitations:
  270.     
  271.       As mentioned above, I substituted /t for writing text files for the
  272.     /b option used in AREAD.EXE for reading binary files. At present
  273.     there is no /cr or /nc options. Let me know if these are desired.  
  274.        
  275.       If you write files to a jdisk, then go to the IBM and link it with
  276.     JLINK.EXE, you can do a dir command and all the transfered files will
  277.     be listed. If you go back to the Amiga and transfer more files, these
  278.     new files will not show up on subsequent directory listings on the
  279.     IBM side. Apparently the IBM makes a copy of the directory listing
  280.     and won't updated it if it thinks nothing has changed. To get these
  281.     files to show up on the directory listing, you have two choices. The
  282.     first is to unlink and relink the jdisk file. The second method,
  283.     which I recommend, is to issue a chkdsk command. This forces the IBM
  284.     to update the directory listing. By using the chkdsk command, you
  285.     also ensure that nothing has gone wrong with the transfer of the files.
  286.     In fact, I recommend doing chkdsk commands periodically anyway to make
  287.     sure everthing is ok with the jdisk. 
  288.     
  289.                          WARNING
  290.                          
  291.        If you have a jdisk linked to the Amiga and do subsequent
  292.     writes with WriteJD, either unlink and relink it, or do a chkdsk
  293.     command. If you use the BridgePort to write to this jdisk without
  294.     doing this it will corrupt the jdisk. I'am planning on fixing this
  295.     by forcing a reset of the IBM drives from the Amiga, but I haven't
  296.     been able to get my hands on the Janus header files yet.                      
  297.       
  298.       There is also something that I discovered when I wrote these programs.
  299.     If you overwrite an existing file, and you run out of disk space, you will
  300.     lose the original file on the disk. This is the case whether you are
  301.     using MSDOS, AREAD.EXE or my program WriteJD. All of these programs
  302.     destroy the orginal to make room for the new copy, so if it can't
  303.     find room for the new, the orginal is gone. Of course, you can always
  304.     write the file to another storage device. 
  305.                                 
  306.                     
  307.      Comments, errors, suggestions can be sent to:
  308.      
  309.      
  310.                       Milt Henderson
  311.                       6815 Wallsey Dr.
  312.                       San Diego,Ca USA
  313.                       92119
  314.                       
  315.       Like I stated above, I have spent considerable time trying to beat all
  316.     the errors out of these programs, but this is the original release and
  317.     there could be something I missed. So be sure your data is backed-up.
  318.       
  319.